import type { AppRouteModule } from '/@/router/types';

import { getParentLayout, LAYOUT } from '/@/router/constant';

const set: AppRouteModule = {
  path: '/setCenter',
  name: 'SetCenter',
  component: LAYOUT,
  redirect: 'setCenter/organization/merchants',
  meta: {
    icon: 'shezhi|svg',
    title: '设置中心',
  },
  children: [
    {
      path: 'organization',
      name: 'Organization',
      component: getParentLayout('SetCenter'),
      meta: {
        title: '机构管理',
        icon: 'icon-institute',
      },
      children: [
        {
          path: 'account',
          name: 'Account',
          component: () => import('/@/views/setCenter/organization/account/index.vue'),
          meta: {
            title: '账号管理',
          },
        },
        {
          path: 'role',
          name: 'Role',
          component: () => import('/@/views/setCenter/organization/role/index.vue'),
          meta: {
            title: '角色管理',
          },
        },
      ],
    },
    {
      path: 'toExamine',
      name: 'ToExamine',
      component: () => import('/@/views/setCenter/toExamine/index.vue'),
      meta: {
        title: '审核管理',
      },
    },
    {
      path: 'cityManagement',
      name: 'CityManagement',
      component: () => import('/@/views/setCenter/cityManagement/index.vue'),
      meta: {
        title: '城市管理',
      },
    },
    {
      path: 'modulemanagement',
      name: 'Modulemanagement',
      component: () => import('/@/views/setCenter/modulemanagement/index.vue'),
      meta: {
        title: '功能模块管理',
      },
    },
    {
      path: 'searchSettings',
      name: 'SearchSettings',
      component: () => import('/@/views/setCenter/searchSettings/index.vue'),
      meta: {
        title: '首页搜素栏设置',
      },
    },

    {
      path: 'menu',
      name: 'Menu',
      component: () => import('/@/views/setCenter/menu/index.vue'),
      meta: {
        title: '菜单管理',
      },
    },
    {
      path: 'log',
      name: 'Log',
      component: () => import('/@/views/setCenter/log/index.vue'),
      meta: {
        title: '操作日志',
      },
    },
  ],
};

export default set;
